<section class="content" xmlns:th="http://www.thymeleaf.org">
	<div class="row">
    	<div class="col-md-12">
        	<div class="panel">
	            <div class="panel-body">
		            <form id="generateCodeConfigForm" role="form" class="form-horizontal">
					    <div class="form-group">
					        <label class="col-md-3 control-label">模块名称:</label>
					        <div class="col-md-5">
					        	<input type="text" id="moduleName" name="moduleName" class="form-control" required="required" onkeyup="moduleNameChange(this)"
									   th:value="${generateCodeConfig?.moduleName}"/>
					        </div>
					    </div>
					    <div class="form-group">
					        <label class="col-md-3 control-label">代码根目录:</label>
					        <div class="col-md-5">
					        	<div class="input-group">
					        		<span class="input-group-addon">/src/main/java/</span>
						        	<input type="text" id="sourceBasePackage" name="sourceBasePackage"
						        		th:value="${generateCodeConfig?.sourceBasePackage}" class="form-control" required="required"/>
					        	</div>
					        </div>
					    </div>
						<div class="form-group">
							<label class="col-md-3 control-label">代码包名:</label>
							<div class="col-md-5">
								<label class="radio-inline">
									<input type="radio" id="sourceIncludeModule1" name="sourceIncludeModule" th:value="'N'" th:checked="true"/>不包含模块名称
								</label>
								<label class="radio-inline">
									<input type="radio" id="sourceIncludeModule2" name="sourceIncludeModule" th:value="'Y'"/>包含模块名称
								</label>
							</div>
						</div>
					    <div class="form-group">
					        <label class="col-md-3 control-label">SQL目录:</label>
					        <div class="col-md-5">
					        	<div class="input-group">
					        		<span class="input-group-addon">/src/main/resources/</span>
						        	<input type="text" id="sqlBasePackage" name="sqlBasePackage"
						        		th:value="${generateCodeConfig?.sqlBasePackage}" class="form-control" required="required"/>
						        	<span class="input-group-addon" id="sqlBasePackageForModule" th:text="${generateCodeConfig?.moduleName}"></span>
					        	</div>
					        </div>
					    </div>
					    <div class="form-group">
					        <label class="col-md-3 control-label">页面目录:</label>
					        <div class="col-md-5">
					        	<div class="input-group">
									<span class="input-group-addon">/src/</span>
									<input type="text" id="pageBasePackage" name="pageBasePackage"
										th:value="${generateCodeConfig?.pageBasePackage}" class="form-control" required="required"/>
					        		<span class="input-group-addon" id="pageBasePackageForModule" th:text="${generateCodeConfig?.moduleName}"></span>
								</div>

					        </div>
					    </div>
					    <div class="form-group">
					        <label class="col-md-3 control-label">风格:</label>
					        <div class="col-md-5">
					        	<select name="pageModel" class="form-control" required="required">
					        		<option th:each="folder : ${templateFolders}" th:value="${folder}" th:text="${folder}"
											th:selected="${folder} == ${generateCodeConfig?.pageModel}">></option>
								</select>
					        </div>
					    </div>
					    <div class="form-group">
					        <label class="col-md-3 control-label">作者:</label>
					        <div class="col-md-5">
					        	<input type="text" name="author" th:value="${generateCodeConfig?.author}"
					        		class="form-control" required="required"/>
					        </div>
					    </div>
					    <input type="hidden" name="tableConfigIds" th:value="${generateCodeConfig?.tableConfigIds}"/>
		            </form>
	            </div>
	            <div class="panel-footer">
	            	<div class="row">
		            	<div class="col-md-9 col-md-offset-3">
							<button type="button" class="btn btn-primary" onclick="generateCode()">生成代码</button>
				          	<button type="button" class="btn btn-default" onclick="forwardPage('/tableConfig/init')">取消</button>
				        </div>
			        </div>
	            </div>
	        </div>
		</div>
	</div>
	<script th:src="@{/js/tableConfig/generateCodeConfig.js}"></script>
</section>
